From 8523784d0080ee00e64e8d80da5c7a4db95e41ab Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Sat, 2 Dec 2000 20:17:48 +0000 Subject: [PATCH] (use-fancy-splash-screens-p): New function. (command-line-1): Use it to determine whether or not to use a fancy splash screen. --- lisp/startup.el | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index f4550310a87..40e0a5f02c3 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1153,6 +1153,20 @@ where FACE is a valid face specification, as it can be used with (kill-buffer splash-buffer))))) +(defun use-fancy-splash-screens-p () + "Return t if fancy splash screens should be used." + (when (or (and (display-color-p) + (image-type-available-p 'xpm)) + (image-type-available-p 'pbm)) + (let* ((img (create-image (or fancy-splash-image + (if (and (display-color-p) + (image-type-available-p 'xpm)) + "splash.xpm" "splash.pbm")))) + (image-height (and img (cdr (image-size img)))) + (window-height (1- (window-height (selected-window))))) + (> window-height (+ image-height 14))))) + + (defun startup-echo-area-message () (if (eq (key-binding "\C-h\C-p") 'describe-project) "For information about the GNU Project and its goals, type C-h C-p." @@ -1241,9 +1255,7 @@ where FACE is a valid face specification, as it can be used with (if (assq 'display (frame-parameters)) - (if (or (and (display-color-p) - (image-type-available-p 'xpm)) - (image-type-available-p 'pbm)) + (if (use-fancy-splash-screens-p) (progn (setq wait-for-input nil) (fancy-splash-screens)) -- 2.30.2